<%@page import="org.springframework.security.core.context.SecurityContextHolder"%>
<%@page import="org.apache.commons.lang.StringUtils"%>
<%@page import="org.apache.commons.lang.time.DateFormatUtils"%>
<%@page import="org.springframework.util.CollectionUtils"%>
<%@page import="java.util.Collection"%>
<%@ include file="../common/common_include.jsp"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	UserInfo user = (UserInfo)SecurityContextHolder.getContext().getAuthentication().getPrincipal();
	String username = user.getName();
	TblCheckShift shift = (TblCheckShift) request.getAttribute("shift");
	String siteid = shift.getSiteid();
	
	String fCheckintime = "";
	String fCheckintime_hour ="";
	String fCheckintime_minute = "";
	if(StringUtils.isNotBlank(shift.getfCheckintime()) && shift.getfCheckintime().split(":").length==2){
		fCheckintime = shift.getfCheckintime();
		fCheckintime_hour = fCheckintime.split(":")[0];
		fCheckintime_minute = fCheckintime.split(":")[1];
	}
	String fCheckouttime = "";
	String fCheckouttime_hour ="";
	String fCheckouttime_minute = "";
	if(StringUtils.isNotBlank(shift.getfCheckouttime()) && shift.getfCheckouttime().split(":").length==2){
		fCheckouttime = shift.getfCheckouttime();
		fCheckouttime_hour = fCheckouttime.split(":")[0];
		fCheckouttime_minute = fCheckouttime.split(":")[1];
	}
	String fLaterMinute = null!=shift.getfLaterMinute()?shift.getfLaterMinute()+"":"";
	String fEarlierMinute = null!=shift.getfEarlierMinute()?shift.getfEarlierMinute()+"":"";
	String fAllowEarlierMinute = null!=shift.getfAllowEarlierMinute()?shift.getfAllowEarlierMinute()+"":"";
	String fAllowLaterMinute = null!=shift.getfAllowLaterMinute()?shift.getfAllowLaterMinute()+"":"";
	String fAsLate = StringUtils.isNotBlank(shift.getfAsLate())?shift.getfAsLate():"";
	String fAsEarly = StringUtils.isNotBlank(shift.getfAsEarly())?shift.getfAsEarly():"";
	String fCheckedDays = StringUtils.isNotBlank(shift.getfCheckedDays())?shift.getfCheckedDays():"";
	String fWorkDay = StringUtils.isNotBlank(shift.getfWorkDay())?shift.getfWorkDay():"";
	
	String sCheckintime = "";
	String sCheckintime_hour ="";
	String sCheckintime_minute = "";
	if(StringUtils.isNotBlank(shift.getsCheckintime()) && shift.getsCheckintime().split(":").length==2){
		sCheckintime = shift.getsCheckintime();
		sCheckintime_hour = sCheckintime.split(":")[0];
		sCheckintime_minute = sCheckintime.split(":")[1];
	}
	String sCheckouttime = "";
	String sCheckouttime_hour ="";
	String sCheckouttime_minute = "";
	if(StringUtils.isNotBlank(shift.getsCheckouttime()) && shift.getsCheckouttime().split(":").length==2){
		sCheckouttime = shift.getsCheckouttime();
		sCheckouttime_hour = sCheckouttime.split(":")[0];
		sCheckouttime_minute = sCheckouttime.split(":")[1];
	}
	String sLaterMinute = null!=shift.getsLaterMinute()?shift.getsLaterMinute()+"":"";
	String sEarlierMinute = null!=shift.getsEarlierMinute()?shift.getsEarlierMinute()+"":"";
	String sAllowEarlierMinute = null!=shift.getsAllowEarlierMinute()?shift.getsAllowEarlierMinute()+"":"";
	String sAllowLaterMinute = null!=shift.getsAllowLaterMinute()?shift.getsAllowLaterMinute()+"":"";
	String sAsLate = StringUtils.isNotBlank(shift.getsAsLate())?shift.getsAsLate():"";
	String sAsEarly = StringUtils.isNotBlank(shift.getsAsEarly())?shift.getsAsEarly():"";
	String sCheckedDays = StringUtils.isNotBlank(shift.getsCheckedDays())?shift.getsCheckedDays():"";
	String sWorkDay = StringUtils.isNotBlank(shift.getsWorkDay())?shift.getsWorkDay():"";
	
	String tCheckintime = "";
	String tCheckintime_hour ="";
	String tCheckintime_minute = "";
	if(StringUtils.isNotBlank(shift.gettCheckintime()) && shift.gettCheckintime().split(":").length==2){
		tCheckintime = shift.gettCheckintime();
		tCheckintime_hour = tCheckintime.split(":")[0];
		tCheckintime_minute = tCheckintime.split(":")[1];
	}
	String tCheckouttime = "";
	String tCheckouttime_hour ="";
	String tCheckouttime_minute = "";
	if(StringUtils.isNotBlank(shift.gettCheckouttime()) && shift.gettCheckouttime().split(":").length==2){
		tCheckouttime = shift.gettCheckouttime();
		tCheckouttime_hour = tCheckouttime.split(":")[0];
		tCheckouttime_minute = tCheckouttime.split(":")[1];
	}
	String tLaterMinute = null!=shift.gettLaterMinute()?shift.gettLaterMinute()+"":"";
	String tEarlierMinute =  null!=shift.gettEarlierMinute()?shift.gettEarlierMinute()+"":"";
	String tAllowEarlierMinute = null!=shift.gettAllowEarlierMinute()?shift.gettAllowEarlierMinute()+"":"";
	String tAllowLaterMinute = null!=shift.gettAllowLaterMinute()?shift.gettAllowLaterMinute()+"":"";
	String tAsLate = StringUtils.isNotBlank(shift.gettAsLate())?shift.gettAsLate():"";
	String tAsEarly = StringUtils.isNotBlank(shift.gettAsEarly())?shift.gettAsEarly():"";
	String tCheckedDays = StringUtils.isNotBlank(shift.gettCheckedDays())?shift.gettCheckedDays():"";
	String tWorkDay = StringUtils.isNotBlank(shift.gettWorkDay())?shift.gettWorkDay():"";
%>

<style>
	.selectHour-split{
		padding:0 2px;
		margin-right:5px;	
	}
	.selectMinute-split{
		padding:0 2px;
	}
	.tr_shift_s{
		background: #f2f2f2;
	}
</style>

<div>
	<form id="LeaveAddForm" target="_coreIframe" method="post" action="<%=request.getContextPath()%>/check/doEditShift" enctype="multipart/form-data">
		<div class="breadcrumb">
			<div class="bcIcon"></div>
			<ul class="bcNav">
				<li>修改班次（修改已排班的班次，会影响考勤统计）</li>
			</ul>
		</div>
		<table class="formTable">
			<tr>
				<td class="tdTitle">班次名称：</td>
				<td><input class="inputText xxs" type="text"  value="<%=shift.getShiftName()%>" name="shiftName">
			</tr>
			<tr>
				<td class="tdTitle">所属公司：</td>
				<td>
					<select id="siteList" class="easyui-combobox" name="siteid" style="width:100px;"></select>
					<span class="errorTipWrap" id="errorTip_userid"></span>
				</td>
			</tr>
			<tr>
				<td>
				</td>
				<td>
					第一个上班时间段设置（比如上午）
				</td>
			</tr>
			<tr>
				<td class="tdTitle">上班打卡时间：</td>
				<td>
					<select sss="checkintime_hour" id="fCheckintime_hour"class="easyui-combobox" name="fCheckintime_hour" style="width:100px;"></select><span class="selectHour-split">时</span>
					<select sss="checkintime_minute" id="fCheckintime_minute" class="easyui-combobox" name="fCheckintime_minute" style="width:100px;"></select><span class="selectMinute-split">分</span>
				</td>
			</tr>
			<tr>
				<td class="tdTitle">下班打开时间：</td>
				<td>
					<select sss="checkintime_hour" id="fCheckouttime_hour" class="easyui-combobox" name="fCheckouttime_hour" style="width:100px;"></select><span class="selectHour-split">时</span>
					<select sss="checkintime_minute" id="fCheckouttime_minute" class="easyui-combobox" name="fCheckouttime_minute" style="width:100px;"></select><span class="selectMinute-split">分</span>
				</td>
			</tr>			
			<tr>
				<td class="tdTitle">计算迟到：</td>
				<td>
					<select sss="laterMinute" id="fLaterMinute" class="easyui-combobox" name="fLaterMinute" style="width:100px;"></select><span class="selectMinute-split">分钟</span>
				</td>
			</tr>
			<tr>
				<td class="tdTitle">计算早退：</td>
				<td>
					<select sss="laterMinute" id="fEarlierMinute" class="easyui-combobox" name="fEarlierMinute" style="width:100px;"></select><span class="selectMinute-split">分钟</span>
				</td>
			</tr>
<!-- 			<tr>
				<td class="tdTitle">有效提前打卡：</td>
				<td>
					<select sss="AllowEarlierMinute" id="fAllowEarlierMinute" class="easyui-combobox" name="fAllowEarlierMinute" style="width:100px;"></select><span class="selectMinute-split">分钟</span>
				</td>
			</tr>
			<tr>
				<td class="tdTitle">有效推迟打卡：</td>
				<td>
					<select sss="AllowEarlierMinute" id="fAllowLaterMinute" class="easyui-combobox" name="fAllowLaterMinute" style="width:100px;"></select><span class="selectMinute-split">分钟</span>
				</td>
			</tr> -->
			<tr>
				<td class="tdTitle">是否考勤设置：</td>
				<td class="" colspan="2">
					<div class="checkbox-wrap">
						<label>
							<input <%=StringUtils.equalsIgnoreCase("1", fAsLate.trim())?"checked=checked":""%> id="fAsLate" type="checkbox" value="1" name="fAsLate" class="checkbox" >
							<span>考勤上班</span>
						</label>
						<label>
							<input <%=StringUtils.equalsIgnoreCase("1", fAsEarly.trim())?"checked=checked":""%> type="checkbox" value="1" name="fAsEarly" class="checkbox">
							<span>考勤下班</span>
						</label>
					</div>
				</td>
			</tr>
			<tr>
				<td class="tdTitle">计算工作天：</td>
				<td>
					<select sss="checkedDays" id="fCheckedDays" class="easyui-combobox" name="fCheckedDays" style="width:100px;"></select><span class="selectMinute-split">天</span>
				</td>
			</tr>
			<tr>
				<td class="tdTitle">考勤日：</td>
				<td class="" colspan="2">
					<div class="checkbox-wrap">
						<input type="hidden" name="fWorkDay" value="<%=fWorkDay%>">
						<label>
							<input <%=fWorkDay.contains("1")?"checked=checked":""%> type="checkbox" class="checkbox fWorkDay_checkbox" s="1">
							<span>星期一</span>
						</label>
						<label>
							<input <%=fWorkDay.contains("2")?"checked=checked":""%> type="checkbox" class="checkbox fWorkDay_checkbox" s="2">
							<span>星期二</span>
						</label>
						<label>
							<input <%=fWorkDay.contains("3")?"checked=checked":""%> type="checkbox" class="checkbox fWorkDay_checkbox" s="3">
							<span>星期三</span>
						</label>
						<label>
							<input <%=fWorkDay.contains("4")?"checked=checked":""%> type="checkbox" class="checkbox fWorkDay_checkbox" s="4">
							<span>星期四</span>
						</label>
						<label>
							<input <%=fWorkDay.contains("5")?"checked=checked":""%> type="checkbox" class="checkbox fWorkDay_checkbox" s="5">
							<span>星期五</span>
						</label>
						<label>
							<input <%=fWorkDay.contains("6")?"checked=checked":""%> type="checkbox" class="checkbox fWorkDay_checkbox" s="6">
							<span>星期六</span>
						</label>
						<label>
							<input <%=fWorkDay.contains("0")?"checked=checked":""%> type="checkbox" class="checkbox fWorkDay_checkbox" s="0">
							<span>星期日</span>
						</label>
					</div>
				</td>
			</tr>
			
			<tr class="tr_shift_s">
				<td>
				</td>
				<td>
					第二个上班时间段设置（比如下午）
				</td>
			</tr>
			<tr class="tr_shift_s">
				<td class="tdTitle">上班打卡时间：</td>
				<td>
					<select sss="checkintime_hour"  id="sCheckintime_hour" class="easyui-combobox" name="sCheckintime_hour" style="width:100px;"></select><span class="selectHour-split">时</span>
					<select sss="checkintime_minute" id="sCheckintime_minute" class="easyui-combobox" name="sCheckintime_minute" style="width:100px;"></select><span class="selectMinute-split">分</span>
				</td>
			</tr>
			<tr class="tr_shift_s">
				<td class="tdTitle">下班打开时间：</td>
				<td>
					<select sss="checkintime_hour"  id="sCheckouttime_hour" class="easyui-combobox" name="sCheckouttime_hour" style="width:100px;"></select><span class="selectHour-split">时</span>
					<select sss="checkintime_minute" id="sCheckouttime_minute" class="easyui-combobox" name="sCheckouttime_minute" style="width:100px;"></select><span class="selectMinute-split">分</span>
				</td>
			</tr>			
			<tr class="tr_shift_s">
				<td class="tdTitle">计算迟到：</td>
				<td>
					<select sss="laterMinute" id="sLaterMinute" class="easyui-combobox" name="sLaterMinute" style="width:100px;"></select><span class="selectMinute-split">分钟</span>
				</td>
			</tr>
			<tr class="tr_shift_s">
				<td class="tdTitle">计算早退：</td>
				<td>
					<select sss="laterMinute" id="sEarlierMinute" class="easyui-combobox" name="sEarlierMinute" style="width:100px;"></select><span class="selectMinute-split">分钟</span>
				</td>
			</tr>
<!-- 			<tr class="tr_shift_s">
				<td class="tdTitle">有效提前打卡：</td>
				<td>
					<select sss="AllowEarlierMinute" id="sAllowEarlierMinute" class="easyui-combobox" name="sAllowEarlierMinute" style="width:100px;"></select><span class="selectMinute-split">分钟</span>
				</td>
			</tr>
			<tr class="tr_shift_s">
				<td class="tdTitle">有效推迟打卡：</td>
				<td>
					<select sss="AllowEarlierMinute" id="sAllowLaterMinute" class="easyui-combobox" name="sAllowLaterMinute" style="width:100px;"></select><span class="selectMinute-split">分钟</span>
				</td>
			</tr> -->
			<tr class="tr_shift_s">
				<td class="tdTitle">是否考勤设置：</td>
				<td class="" colspan="2">
						<div class="checkbox-wrap">
							<label>
								<input <%=StringUtils.equalsIgnoreCase("1", sAsLate.trim())?"checked=checked":""%> id="setTop" type="checkbox" value="1" name="sAsLate" class="checkbox">
								<span>考勤上班</span>
							</label>
							<label>
								<input <%=StringUtils.equalsIgnoreCase("1", sAsEarly.trim())?"checked=checked":""%> id="setImportant" type="checkbox" value="1" name="sAsEarly" class="checkbox">
								<span>考勤下班</span>
							</label>
						</div>
					</td>
			</tr>
			<tr class="tr_shift_s">
				<td class="tdTitle">计算工作天：</td>
				<td>
					<select sss="checkedDays" id="sCheckedDays" class="easyui-combobox" name="sCheckedDays" style="width:100px;"></select><span class="selectMinute-split">天</span>
				</td>
			</tr>
			<tr class="tr_shift_s">
				<td class="tdTitle">考勤日：</td>
				<td class="" colspan="2">
					<div class="checkbox-wrap">
						<input type="hidden" name="sWorkDay" value="<%=sWorkDay%>">
						<label>
							<input <%=sWorkDay.contains("1")?"checked=checked":""%> type="checkbox" class="checkbox sWorkDay_checkbox" s="1">
							<span>星期一</span>
						</label>
						<label>
							<input <%=sWorkDay.contains("2")?"checked=checked":""%> type="checkbox" class="checkbox sWorkDay_checkbox" s="2">
							<span>星期二</span>
						</label>
						<label>
							<input <%=sWorkDay.contains("3")?"checked=checked":""%> type="checkbox" class="checkbox sWorkDay_checkbox" s="3">
							<span>星期三</span>
						</label>
						<label>
							<input <%=sWorkDay.contains("4")?"checked=checked":""%> type="checkbox" class="checkbox sWorkDay_checkbox" s="4">
							<span>星期四</span>
						</label>
						<label>
							<input <%=sWorkDay.contains("5")?"checked=checked":""%> type="checkbox" class="checkbox sWorkDay_checkbox" s="5">
							<span>星期五</span>
						</label>
						<label>
							<input <%=sWorkDay.contains("6")?"checked=checked":""%> type="checkbox" class="checkbox sWorkDay_checkbox" s="6">
							<span>星期六</span>
						</label>
						<label>
							<input <%=sWorkDay.contains("0")?"checked=checked":""%>v type="checkbox" class="checkbox sWorkDay_checkbox" s="0">
							<span>星期日</span>
						</label>
					</div>
				</td>
			</tr>
			
			<tr>
				<td>
				</td>
				<td>
					第三个上班时间段设置（比如夜间）
				</td>
			</tr>
			<tr>
				<td class="tdTitle">上班打卡时间：</td>
				<td>
					<select sss="checkintime_hour"  id="tCheckintime_hour" class="easyui-combobox" name="tCheckintime_hour" style="width:100px;"></select><span class="selectHour-split">时</span>
					<select sss="checkintime_minute" id="tCheckintime_minute" class="easyui-combobox" name="tCheckintime_minute" style="width:100px;"></select><span class="selectMinute-split">分</span>
				</td>
			</tr>
			<tr>
				<td class="tdTitle">下班打开时间：</td>
				<td>
					<select sss="checkintime_hour"  id="tCheckouttime_hour" class="easyui-combobox" name="tCheckouttime_hour" style="width:100px;"></select><span class="selectHour-split">时</span>
					<select sss="checkintime_minute" id="tCheckouttime_minute" class="easyui-combobox" name="tCheckouttime_minute" style="width:100px;"></select><span class="selectMinute-split">分</span>
				</td>
			</tr>			
			<tr>
				<td class="tdTitle">计算迟到：</td>
				<td>
					<select sss="laterMinute" id="tLaterMinute" class="easyui-combobox" name="tLaterMinute" style="width:100px;"></select><span class="selectMinute-split">分钟</span>
				</td>
			</tr>
			<tr>
				<td class="tdTitle">计算早退：</td>
				<td>
					<select sss="laterMinute" id="tEarlierMinute" class="easyui-combobox" name="tEarlierMinute" style="width:100px;"></select><span class="selectMinute-split">分钟</span>
				</td>
			</tr>
<!-- 			<tr>
				<td class="tdTitle">有效提前打卡：</td>
				<td>
					<select sss="AllowEarlierMinute" id="tAllowEarlierMinute" class="easyui-combobox" name="tAllowEarlierMinute" style="width:100px;"></select><span class="selectMinute-split">分钟</span>
				</td>
			</tr>
			<tr>
				<td class="tdTitle">有效推迟打卡：</td>
				<td>
					<select sss="AllowEarlierMinute" id="tAllowLaterMinute" class="easyui-combobox" name="tAllowLaterMinute" style="width:100px;"></select><span class="selectMinute-split">分钟</span>
				</td>
			</tr> -->
			<tr>
				<td class="tdTitle">是否考勤设置：</td>
				<td class="" colspan="2">
					<div class="checkbox-wrap">
						<label>
							<input <%=StringUtils.equalsIgnoreCase("1", tAsLate.trim())?"checked=checked":""%> id="setTop" type="checkbox" value="1" name="tAsLate" class="checkbox">
							<span>考勤上班</span>
						</label>
						<label>
							<input <%=StringUtils.equalsIgnoreCase("1", tAsEarly.trim())?"checked=checked":""%> id="setImportant" type="checkbox" value="1" name="tAsEarly" class="checkbox">
							<span>考勤下班</span>
						</label>
					</div>
				</td>
			</tr>
			<tr>
				<td class="tdTitle">计算工作天：</td>
				<td>
					<select sss="checkedDays" id="tCheckedDays" class="easyui-combobox" name="tCheckedDays" style="width:100px;"></select><span class="selectMinute-split">天</span>
				</td>
			</tr>
			<tr>
				<td class="tdTitle">考勤日：</td>
				<td class="" colspan="2">
					<div class="checkbox-wrap">
						<input type="hidden" name="tWorkDay" value="<%=tWorkDay%>">
						<label>
							<input <%=tWorkDay.contains("1")?"checked=checked":""%> type="checkbox" class="checkbox tWorkDay_checkbox" s="1">
							<span>星期一</span>
						</label>
						<label>
							<input <%=tWorkDay.contains("2")?"checked=checked":""%> type="checkbox" class="checkbox tWorkDay_checkbox" s="2">
							<span>星期二</span>
						</label>
						<label>
							<input <%=tWorkDay.contains("3")?"checked=checked":""%> type="checkbox" class="checkbox tWorkDay_checkbox" s="3">
							<span>星期三</span>
						</label>
						<label>
							<input <%=tWorkDay.contains("4")?"checked=checked":""%> type="checkbox" class="checkbox tWorkDay_checkbox" s="4">
							<span>星期四</span>
						</label>
						<label>
							<input <%=tWorkDay.contains("5")?"checked=checked":""%> type="checkbox" class="checkbox tWorkDay_checkbox" s="5">
							<span>星期五</span>
						</label>
						<label>
							<input <%=tWorkDay.contains("6")?"checked=checked":""%> type="checkbox" class="checkbox tWorkDay_checkbox" s="6">
							<span>星期六</span>
						</label>
						<label>
							<input <%=tWorkDay.contains("0")?"checked=checked":""%> type="checkbox" class="checkbox tWorkDay_checkbox" s="0">
							<span>星期日</span>
						</label>
					</div>
				</td>
			</tr>
			
			<tr>
			<td class="tdTitle"></td>
			<td>
				<div>
					<input class="input-btn-microsoft" type="submit" value="提交">
					<a class="a-btn-microsoft" href="javascript:XF.NAV.navTo('/check')">取消</a>
				</div>
			</td>
		</tr>	
		</table>
		<input type="hidden" value="<%=username %>" name="addUser"> 	
		<input type="hidden" value="<%=EncrypTool.encode(shift.getId()+"") %>" name="id"> 
	</form>
	<iframe id="_coreIframe" name="_coreIframe" style="display: none;"></iframe>
</div>
<script>
$('#siteList').combobox({
	url:global.contextPath + '/company/siteList',
	valueField:'siteid',
	textField:'sitename',
});

$('select[sss=checkintime_hour]').combobox({
	url:global.contextPath + '/check/allHour',
	valueField:'hourId',
	textField:'hourName',
});

$('select[sss=checkintime_minute]').combobox({
	url:global.contextPath + '/check/allMinute',
	valueField:'minuteId',
	textField:'minuteName',
});

$('select[sss=laterMinute]').combobox({
	url:global.contextPath + '/check/laterMinute',
	valueField:'minuteId',
	textField:'minuteName',
});
$('select[sss=AllowEarlierMinute]').combobox({
	url:global.contextPath + '/check/elareyMinute',
	valueField:'minuteId',
	textField:'minuteName',
});
$('select[sss=checkedDays]').combobox({
	url:global.contextPath + '/check/checkedDays',
	valueField:'dayId',
	textField:'dayName',
});
$('#siteList').combobox('setValue', '<%=siteid%>');


<%
if(StringUtils.isNotBlank(fCheckintime_hour)&&StringUtils.isNotBlank(fCheckintime_minute)){
	%>
	$('#fCheckintime_hour').combobox('setValue', '<%=fCheckintime_hour%>');
	$('#fCheckintime_minute').combobox('setValue', '<%=fCheckintime_minute%>');
	<%
}
if(StringUtils.isNotBlank(fCheckouttime_hour)&&StringUtils.isNotBlank(fCheckouttime_minute)){
	%>
	$('#fCheckouttime_hour').combobox('setValue', '<%=fCheckouttime_hour%>');
	$('#fCheckouttime_minute').combobox('setValue', '<%=fCheckouttime_minute%>');
	<%
}
if(StringUtils.isNotBlank(fLaterMinute)){
	%>
	$('#fLaterMinute').combobox('setValue', '<%=fLaterMinute%>');
	<%
}
if(StringUtils.isNotBlank(fEarlierMinute)){
	%>
	$('#fEarlierMinute').combobox('setValue', '<%=fEarlierMinute%>');
	<%
}
if(StringUtils.isNotBlank(fAllowEarlierMinute)){
	%>
	$('#fAllowEarlierMinute').combobox('setValue', '<%=fAllowEarlierMinute%>');
	<%
}
if(StringUtils.isNotBlank(fAllowLaterMinute)){
	%>
	$('#fAllowLaterMinute').combobox('setValue', '<%=fAllowLaterMinute%>');
	<%
}
if(StringUtils.isNotBlank(fCheckedDays)){
	%>
	$('#fCheckedDays').combobox('setValue', '<%=fCheckedDays%>');
	<%
}


if(StringUtils.isNotBlank(sCheckintime_hour)&&StringUtils.isNotBlank(sCheckintime_minute)){
	%>
	$('#sCheckintime_hour').combobox('setValue', '<%=sCheckintime_hour%>');
	$('#sCheckintime_minute').combobox('setValue', '<%=sCheckintime_minute%>');
	<%
}
if(StringUtils.isNotBlank(sCheckouttime_hour)&&StringUtils.isNotBlank(sCheckouttime_minute)){
	%>
	$('#sCheckouttime_hour').combobox('setValue', '<%=sCheckouttime_hour%>');
	$('#sCheckouttime_minute').combobox('setValue', '<%=sCheckouttime_minute%>');
	<%
}
if(StringUtils.isNotBlank(sLaterMinute)){
	%>
	$('#sLaterMinute').combobox('setValue', '<%=sLaterMinute%>');
	<%
}
if(StringUtils.isNotBlank(sEarlierMinute)){
	%>
	$('#sEarlierMinute').combobox('setValue', '<%=sEarlierMinute%>');
	<%
}
if(StringUtils.isNotBlank(sAllowEarlierMinute)){
	%>
	$('#sAllowEarlierMinute').combobox('setValue', '<%=sAllowEarlierMinute%>');
	<%
}
if(StringUtils.isNotBlank(sAllowLaterMinute)){
	%>
	$('#sAllowLaterMinute').combobox('setValue', '<%=sAllowLaterMinute%>');
	<%
}
if(StringUtils.isNotBlank(sCheckedDays)){
	%>
	$('#sCheckedDays').combobox('setValue', '<%=sCheckedDays%>');
	<%
}


if(StringUtils.isNotBlank(tCheckintime_hour)&&StringUtils.isNotBlank(tCheckintime_minute)){
	%>
	$('#tCheckintime_hour').combobox('setValue', '<%=tCheckintime_hour%>');
	$('#tCheckintime_minute').combobox('setValue', '<%=tCheckintime_minute%>');
	<%
}
if(StringUtils.isNotBlank(tCheckouttime_hour)&&StringUtils.isNotBlank(tCheckouttime_minute)){
	%>
	$('#tCheckouttime_hour').combobox('setValue', '<%=tCheckouttime_hour%>');
	$('#tCheckouttime_minute').combobox('setValue', '<%=tCheckouttime_minute%>');
	<%
}
if(StringUtils.isNotBlank(tLaterMinute)){
	%>
	$('#tLaterMinute').combobox('setValue', '<%=tLaterMinute%>');
	<%
}
if(StringUtils.isNotBlank(tEarlierMinute)){
	%>
	$('#tEarlierMinute').combobox('setValue', '<%=tEarlierMinute%>');
	<%
}
if(StringUtils.isNotBlank(tAllowEarlierMinute)){
	%>
	$('#tAllowEarlierMinute').combobox('setValue', '<%=tAllowEarlierMinute%>');
	<%
}
if(StringUtils.isNotBlank(tAllowLaterMinute)){
	%>
	$('#tAllowLaterMinute').combobox('setValue', '<%=tAllowLaterMinute%>');
	<%
}
if(StringUtils.isNotBlank(tCheckedDays)){
	%>
	$('#tCheckedDays').combobox('setValue', '<%=tCheckedDays%>');
	<%
}
%> 
XF.Check.init();
</script>


